package com.sf.decorator;

/**
 * @author 埔枘
 * @date 2019/12/03
 * 装饰器模式
 **/
public abstract class HandCakeDecorator extends HandCake{

    private HandCake handCake;

    public HandCakeDecorator(HandCake handCake) {
        this.handCake = handCake;
    }

    protected abstract void doSomething();

    @Override
    protected String getName() {
        return this.handCake.getName();
    }

    @Override
    protected int getPrice() {
        return this.handCake.getPrice();
    }
}
